var oprate=[
            {"id":"updbtn","value":"审核","color":"blue","func":"detail(this)"},
            {"id":"delbtn","value":"删除","color":"red","func":"del(this)"}];
var requestUrl="../../reply/list";
var fileChangeUrl="../../album/frontpic?id=";
datatbody="datatbody";
datathead="datathead";
$(function(){
	search(datatbody,datathead);
});
//详情
function detail(obj){
	var id=$(obj).parent().find("id").html();
	du("../../reply/detail","detail",obj,function(json){
		textinit(json.reply);
	},function(opo,obtn,funcflag){
		var status=obtn.id=="pass"?2:0;
		var paramjson={id:id,status:status};
		$.post("../../reply/pass",paramjson,function(data){
			funcflag(data.flag);
		})
	},200);
}
//删除
function del(obj){
	sure("确认删除吗?",function(){
		var id=$(obj).parent().parent().find("id").html();
		$.post("../../reply/delete/"+id,function(data){
			if(data.flag==1){
				msg("操作成功 !",window.parent.document);
			}else{
				msg("操作失败 !",window.parent.document);
			}
			search(datatbody,datathead);
		});
	},window.parent.document,obj);
}